<?php  
	/** 
	 * 创建一个测试的Service 
	 * @author zhuli 
	 */  
	class TestService extends Service { 

		public function __construct() {  
        	parent::__construct();  
		 	$this->userDao = InitPHP::getDao("test",'test');			//实例化dao层
		 } 
	      
	    public function getVal() {  
	        echo "<h1>This is TestService</h1>";  
	    } 

	    /**
	     * 根据id获得一个记录
	     * @param  int $id 
	     * @return      
	     */
	    function getTestOne($id){
	    	if($id){
	    		$one = $this->userDao->getOne($id);
	    	}
	    	echo $one['name'];
	    } 
	}  